"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Hall_1 = __importDefault(require("../models/Hall"));
const Room_1 = __importDefault(require("../models/Room"));
async function default_1(call) {
    const openid = call.req.player.openid;
    let conn = Hall_1.default.instance.get(openid);
    if (!conn) {
        conn = Hall_1.default.instance.connect(openid, call.conn);
        // call.error("已断开连接")
        // return
    }
    Room_1.default.instance.removeByOpenid(openid);
    call.succ({});
}
exports.default = default_1;
